<template>
  <view v-if="shenheStatus != 1 || !shenheAliStatus" class="diy-my-page">
    <diyMyPage ref="my"></diyMyPage>
    <transitionPage></transitionPage>
  </view>
  <Shenhe v-else-if="shenheStatus == 1"></Shenhe>
</template>

<script>
import Shenhe from "@/components/shenhe/shenhe";
import diyMyPage from "@/components/diySystemPage/userPage/index.vue";

export default {
  components: {
    diyMyPage,
    Shenhe,
  },
  data() {
    return {
      isLogin: false,
    };
  },
  onLoad() {
    const isLogin = this.$utils.isLogin(false);
    this.isLogin = isLogin;
    this.$nextTick(() => {
      this.$refs.my && this.$refs.my.readyRequest();
    });
  },
  onShow() {
    uni.setNavigationBarTitle({
			title : ' '
		})

    const isLogin = this.$utils.isLogin(false);
    if (!isLogin) {
      uni.removeStorageSync("hasUri");
      this.$store.commit("setNoLoginTabarPath", "/pages/my/my");
      this.$store.commit("setRouteType", "switchtab");
    }
    if (this.isLogin != isLogin) {
      this.$nextTick(() => {
        this.$refs.my && this.$refs.my.readyRequest();
      });
      this.isLogin = isLogin;
    }
    this.$nextTick(() => {
      this.$refs.my && this.$refs.my.getuserinfo(false);
    });
  },
  onPullDownRefresh() {
    this.$nextTick(() => {
      this.$refs.my.readyRequest();
    });
  },
};
</script>

<style lang="scss" scoped>
.diy-my-page {
  width: 100%;
}
</style>
